<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>清除浮动</title>
    <style>
        #div1{
            background: #FAA53B;
            width: 200px;
            height: 200px;
            float: right;

        }
        #div2{
            background: red;
            width: 200px;
            height: 200px;
            float: right;
            clear: right;

        }
        #div3{
            background: blue;
            width: 200px;
            height: 200px;
            float: right;
            /*clear: right;*/
        }
        #div4{
            background: #000000;
            width: 200px;
            height: 200px;
            float: right;
            /*clear: right;*/
        }
    </style>
</head>
<body>
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
</body>
</html>